<script type="text/javascript">
$(function(){
  $('.sidebar-menu .treeview').on('click', function (){
    $('.treeview').removeClass('active');
    //$(this).addClass('active');  
	$(this).addClass('active');   
  });
});
</script>
<nav>
<ul class="sidebar-menu">
     <?=$menus;?>
</ul>
</nav>